import i18n from '@/lang';
import { token } from '@/util/storage';
import { debounce } from "lodash";

export default class MainErrorStatus {
  public 1001 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.1001").toString(),
      duration: 2000,
      icon: "none"
    });
  })
  public 400 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.400").toString(),
      duration: 2000,
      icon: "none"
    });
  })
  public 100 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.100").toString(),
      duration: 2000,
      icon: "none"
    });
  })
  public 101 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.101").toString(),
      duration: 2000,
      icon: "none"
    });
    token.set("");
    location.href = "/#/pages/login/wechat";
  })
  public 102 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.102").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 103 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.103").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 104 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.104").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 105 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.105").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 106 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.106").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 107 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.107").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 108 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.108").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 109 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.109").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 110 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.110").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 111 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.111").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 112 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.112").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 113 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.113").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 114 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.114").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 115 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.115").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 116 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.116").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 117 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.117").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 118 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.118").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 119 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.119").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 10000 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.10000").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 10001 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.10001").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 10002 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.10002").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 10003 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.10003").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 10004 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.10004").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 10005 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.10005").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 10007 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.10007").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 10008 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.10008").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 10006 = debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.10006").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 10009= debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.10009").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 10010= debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.10010").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 10011= debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.10011").toString(),
      duration: 2000,
      icon: "none"
    });
  });
  public 10012= debounce(() => {
    uni.showToast({
      title: i18n.t("main_service.error_status.10012").toString(),
      duration: 2000,
      icon: "none"
    });
  });
}